<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改出库单')" />
    <th:block th:include="include :: datetimepicker-css" />
    <style>
        .danwei {
            position: absolute;
            left: 610px;
            top: 6px;
            font-size: 14px;
        }
        .form-group {
            position: relative;
        }
        .is-required::after {
            content: "*";
            color: red;
            margin-left: 5px;
        }
    </style>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-outbound-edit" th:object="${orderOutbound}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">订单编号：</label>
                    <div class="col-sm-8">
                        <input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">客户名称：</label>
                    <div class="col-sm-8">
                        <input name="customerName" th:field="*{customerName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">品名：</label>
                    <div class="col-sm-8">
                        <input name="productName" th:field="*{productName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">规格：</label>
                    <div class="col-sm-8">
                        <input name="specs" th:field="*{specs}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纸箱长度：</label>
                    <div class="col-sm-8">
                        <input name="sizeLength" th:field="*{sizeLength}" class="form-control" type="text">
                    </div>
                    <label class="danwei">mm</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纸箱宽度：</label>
                    <div class="col-sm-8">
                        <input name="sizeWidth" th:field="*{sizeWidth}" class="form-control" type="text">
                    </div>
                    <label class="danwei">mm</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纸箱高度：</label>
                    <div class="col-sm-8">
                        <input name="sizeHeight" th:field="*{sizeHeight}" class="form-control" type="text">
                    </div>
                    <label class="danwei">mm</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纸箱面积：</label>
                    <div class="col-sm-8">
                        <input name="area" th:field="*{area}" class="form-control" type="text">
                    </div>
                    <label class="danwei">m²</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">出库数量：</label>
                    <div class="col-sm-8">
                        <input name="quantity" th:field="*{quantity}" class="form-control" type="text">
                    </div>
                    <label class="danwei">套</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纸箱售价：</label>
                    <div class="col-sm-8">
                        <input name="unitPrice" th:field="*{unitPrice}" class="form-control" type="text">
                    </div>
                    <label class="danwei">元/套</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">返利：</label>
                    <div class="col-sm-8">
                        <input name="rebate" th:field="*{rebate}" class="form-control" type="text">
                    </div>
                    <label class="danwei">元/套</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">层数：</label>
                    <div class="col-sm-8">
                        <input name="layerCount" th:field="*{layerCount}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">车号：</label>
                    <div class="col-sm-8">
                        <input name="vehicleNumber" th:field="*{vehicleNumber}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">运费：</label>
                    <div class="col-sm-8">
                        <input name="carriage" th:field="*{carriage}" class="form-control" type="text">
                    </div>
                    <label class="danwei">元</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">供应商名称：</label>
                    <div class="col-sm-8">
                        <input name="supplierName" th:field="*{supplierName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">客户地址：</label>
                    <div class="col-sm-8">
                        <input name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">出库日期：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="deliveryDate" th:value="${#dates.format(orderOutbound.deliveryDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">制单人：</label>
                    <div class="col-sm-8">
                        <input name="createdBy" th:field="*{createdBy}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">库存部门人员：</label>
                    <div class="col-sm-8">
                        <input name="inventoryStaff" th:field="*{inventoryStaff}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "cardbox/outbound";
        $("#form-outbound-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-outbound-edit').serialize());
            }
        }

        $("input[name='deliveryDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>